package com.five.wisdomEat.service;

import com.five.wisdomEat.entity.Business;
import com.five.wisdomEat.entity.ResponseMessage;
import com.five.wisdomEat.mapper.BusinessMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BusinessService {
    @Autowired
    BusinessMapper mapper;

    public ResponseMessage login(Business business){
        ResponseMessage message = new ResponseMessage();
        Boolean result = mapper.businessLogin(business)>0;
        message.setMessage("登陆成功");
        message.setSuccess(result);
        return message;
    }

    public ResponseMessage selectBusinessList(String bNumber){
        ResponseMessage message = new ResponseMessage();
        message.setMessage("查询成功");
        message.setData(mapper.selectBusinessList(bNumber));
        return message;
    }
}
